/**
 * Complex template test cases for TIR
 */

#include <vector>
#include <map>
#include <unordered_map>
#include <string>
#include <memory>
#include <functional>
#include <array>

namespace MyNamespace {
    template<typename T, size_t N>
    class MyTemplate {
    public:
        using value_type = T;
        std::array<T, N> data;
    };
    
    template<typename Key, typename Value>
    using MyMap = std::unordered_map<Key, Value>;
}

template<typename T>
class CustomAllocator {
public:
    using value_type = T;
    // ... allocator implementation
};

int main() {
    // Deeply nested templates
    std::map<std::string, std::vector<std::map<int, double>>> deeply_nested;  // Line 34
    
    // Custom template with namespace
    MyNamespace::MyTemplate<float, 10> custom_template;                       // Line 37
    
    // Template alias usage  
    MyNamespace::MyMap<std::string, int> aliased_map;                          // Line 40
    
    // Template with custom allocator
    std::vector<int, CustomAllocator<int>> custom_alloc_vector;               // Line 43
    
    // Function template instantiation
    std::function<int(double, std::string)> function_template;                // Line 46
    
    // Template with multiple template parameters
    std::unordered_map<std::string, std::vector<int>, std::hash<std::string>, 
                       std::equal_to<std::string>, 
                       std::allocator<std::pair<const std::string, std::vector<int>>>> 
        ultra_complex_map;                                                     // Line 52
    
    // Shared pointer to template
    std::shared_ptr<std::vector<MyNamespace::MyTemplate<double, 5>>> 
        shared_template_vector;                                                // Line 56
    
    // Auto with complex template deduction
    auto complex_auto = std::make_shared<std::map<std::string, 
                                          std::vector<std::pair<int, double>>>>();  // Line 60
    
    return 0;
}